<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>行政区划配置</title>
    <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/dtree.css"/>
    <link rel="stylesheet" href="../../../assets/module/dtree/font/dtreefont.css"/>
    <link rel="stylesheet" href="../../../assets/module/admin.css?v=313"/>
    <link rel="stylesheet" href="../../../assets/css/publicStyle.css"/>
    <!--[if lt IE 9]>
    <script src="../../../assets/libs/html5shiv.min.js"></script>
    <script src="../../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-form-select .layui-edge{
            left: 158px;
        }
        #page-box{
            display: inline;
            float: right;
        }

        #page-box .layui-laypage{
            margin: 0;
        }
        #regionset-tmpl-box{
            float: left;
        }
        .layui-layer-setwin .layui-layer-close2{
            right: 14px!important;
            top: -5px!important;
            width: 30px!important;
            height: 30px!important;
        }
        .layui-layer.layui-layer-adminRight {
            top: 14px !important;
        }
        #orgionRegionTree,#RegionTree,#changeRegionTree{
            height: 136px;
            overflow: auto;
            border: 1px solid #ddd;
            border-radius: 0 3px 3px 0;
            width: 200px;
            z-index: 100;
            background: #fff;
            display: none;
        }
        #addCatalogForm .layui-form-label{
            width: 113px;
        }
        #addCatalogForm .layui-input-block{
            margin-left: 145px;
        }
        #addCatalogForm .text-right{
            margin: 30px 0;
        }
        .layui-table-view .layui-table-body tr td{
            cursor: pointer;
        }
    </style>
    <script src="../../../assets/libs/jquery/jquery-3.2.1.min.js"></script>
    <!-- 正文开始 -->
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar">
                <div class="layui-card-header">
                    行政区划配置
                </div>
                <div class="layui-card-body mini-bar" >
                    <div id="regionset-tmpl-box"></div>
                    <div id="page-box"></div>
                    <table class="layui-table" id="regionsettable" lay-filter="regionsettable"></table>
                </div>
            </div>

        </div>
    </div>
</div>

<!-- 分组表格操作列DOM -->
<script id="ident-template-idenManage-box">
</script>
<!-- 指标管理表格操作列 -->
<script type="text/tmpl" id="ident-template-idenManage-tmp">
    {{ if hasPower("/region/manage/set:edit")}}
    <a class="layui-btn layui-btn-xs layui-btn-warning" lay-event="edit">编辑</a>
    {{/if}}
    {{ if hasPower("/region/manage/set:delete")}}
    <a class="layui-btn layui-btn-danger layui-btn-xs micro-ident-group-delete" lay-event="delete">删除</a>
    {{/if}}
      {{ if hasPower("/region/manage/set:updateOrgion")}}
    <a class="layui-btn layui-btn-xs layui-btn-paramy" lay-event="updateOrigin">更新原点区划</a>
    {{/if}}
    {{ if hasPower("/region/manage/set:updateLastLog")}}
    <a class="layui-btn layui-btn-xs layui-btn-paramy" lay-event="updateLastLog">更新上次版本</a>
    {{/if}}
</script>

<!--新增区划弹窗-->
<script type="text/html" id="addClassifyForm">
    <form id="addCatalogForm" lay-filter="addCatalogForm" class="layui-form model-form">

        <div class="layui-form-item">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" lay-verify="required"  />
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">年份</label>
                <div class="layui-input-block" id="region-year">
                    <div class="layui-input-inline">
                        <input type="year" name="year" class="layui-input" id="test2" placeholder="请选择年" lay-verify="required">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">区划类型</label>
            <div class="layui-input-block" id="region-type">
                <select name="regionType" lay-filter="aihao" id="regionSetType" placeholder="请选择区划类型">

                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">上次版本</label>
            <div class="layui-input-block" id="prev-edition">
                <select name="lrcid" lay-filter="aihao" id="setVersionListBox" placeholder="请选择上次版本">

                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">空间分析服务</label>
            <div class="layui-input-block">
                <input name="analysisService" placeholder="请输入空间分析服务" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数据分析服务</label>
            <div class="layui-input-block">
                <input name="dataService" placeholder="请输入数据分析服务" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">区划边界图层服务</label>
            <div class="layui-input-block">
                <input name="queryService" placeholder="请输入区划边界图层服务" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips"  />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">二维图层服务</label>
            <div class="layui-input-block">
                <input name="tdlayerService" placeholder="请输入二维图层服务" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">三维图层服务</label>
            <div class="layui-input-block">
                <input name="sdlayerService" placeholder="请输入三维图层服务" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地图UTFGrid</label>
            <div class="layui-input-block">
                <input name="utfGrid" placeholder="请输入地图UTFGrid" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">点数据名称</label>
            <div class="layui-input-block">
                <input name="dataPoint" placeholder="请输入点数据名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">面数据名称</label>
            <div class="layui-input-block">
                <input name="dataSet" placeholder="请输入面数据名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数据源名称</label>
            <div class="layui-input-block">
                <input name="dataSource" placeholder="请输入数据源名称" type="text" class="layui-input" maxlength="20"
                       lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="status" lay-skin="switch" checked lay-text="启用|停用" lay-filter="autoplay">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="memo" placeholder="请输入备注" class="layui-textarea" maxlength="20" lay-verType="tips" />
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closePageDialog">取消</button>
            <button class="layui-btn" lay-filter="addCatalogSubmit" lay-submit>确定</button>
        </div>
    </form>
</script>

<!--渲染区划配置权限-->
<script type="text/tmpl" id="regionset-tmpl">
    <div class="layui-form toolbar">
        <div class="layui-form-item">
            <div class="layui-inline">
                {{ if hasPower("/region/manage/set:add")}}
                <button class="layui-btn icon-btn layui-btn-sm" id="add-btn-template-idenManage" >
                    <i class="layui-icon">&#xe654;</i>新增
                </button>
                {{/if}}
            </div>
        </div>
    </div>
  </script>


<!--区划配置类型-->
<script type="text/tmpl" id="regionSetType-tmpl">
   {{each list}}
   <option value="{{$value.value}}">{{$value.type}}</option>
   {{/each}}
</script>

<!--区划配置类型-->
<script type="text/tmpl" id="setVersionList-tmpl">
<option value="">请选择</option>
   {{each records}}
   <option value="{{$value.id}}">{{$value.name}}</option>
   {{/each}}
</script>

<!-- js部分 -->
<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../../assets/js/common.js?v=313"></script>

<script src="../../../assets/libs/template-web.js"></script>
<script src="../../../assets/libs/axios.min.js"></script>
<script src="../../../assets/js/config.js"></script>
<script src="../../../assets/js/authority.js"></script>

<script src="../../../assets/js/config/region.js"></script>
<script src="../../../assets/js/region/regionManage/regionset.js"></script>
</body>

</html>